package com.zhuiyun.educations.api.subject.service;

import com.zhuiyun.educations.api.subject.entity.Subject;
import com.zhuiyun.educations.common.response.CommonResult;
import com.zhuiyun.educations.util.pageUtil.PageRequest;
import com.zhuiyun.educations.util.pageUtil.PageResult;

import java.util.List;

/**
 * @ClassName SubjectService
 * @Description TODO 科目业务逻辑层
 * @Author 杨友朋
 * @Date 2023/6/19 14:55
 **/
public interface SubjectService {
    /**
     * @Author 杨友朋
     * @Description TODO 分页全查父级科目
     * @Date 2023/6/20 8:32
     * @Return PageResult
     * @param subject,pageRequest
     */
    PageResult selectSubject(Subject subject, PageRequest pageRequest);

    /**
     * @Author 杨友朋
     * @Description TODO 全查父级科目
     * @Date 2023/6/21 20:26
     * @Return  List<Subject>
     * @param subject
     */
    List<Subject> selectAll(Subject subject);


    /**
     * @Author 杨友朋
     * @Description TODO 添加父级科目
     * @Date 2023/6/21 20:28
     * @Return CommonResult
     * @param subject
     */
    CommonResult insertSubject(Subject subject);

    /**
     * @Author 杨友朋
     * @Description TODO 根据id删除父级科目
     * @Date 2023/6/21 20:29
     * @Return CommonResult
     * @param id
     */
    CommonResult deleteSubjectById(Integer id);

    /**
     * @Author 杨友朋
     * @Description TODO 根据ids批量删除父级科目
     * @Date 2023/6/21 20:30
     * @Return CommonResult
     * @param ids
     */
    CommonResult deleteSubjectByIds(List<Integer> ids);

}
